<template>
    <view class="about">
      <!-- 头部 -->
      <view class="header_bar header_fixed header_main">
        <view class="header">
          <view class="header-goBack" @tap.stop="$tools.switchTab('/pages/user/user')"></view>
          <view class="header-title">关于我们</view>
        </view> 
      </view> 
      <view class="content">
        <view class="img">
          <image :src="detail.img" mode="widthFix"/>
        </view>
        <view class="sameInfo des" v-html="detail.content">
        </view>
        <view class="title">我们的邮箱</view>
        <view class="sameInfo info">
          <view class="p">补充协议、投诉与建议、变更账户信息</view>
          <view class="p">{{ detail.remark }}</view>
          <view class="submit" @tap.stop="$tools.copy(detail.remark)">复制</view>
        </view>
        <view class="sameInfo group" @tap.stop="$tools.jump('/pages/operate/information',1)">
          平台协议
        </view>
        <view class="sameInfo group" @tap.stop="$tools.jump('/pages/operate/information',2)">
          隐私政策
        </view>
        <view class="version">v{{ version }}</view>
      </view>

    </view>

</template>

<script>
import url from '@/common/js/url.js'
export default {
    data () {
        return {
          detail:{},
          version:url.version
        };
    },
    onLoad () {
      this.getDetail()
      console.log('url',url)
       // 获取本地应用资源版本号
      plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
          this.version = wgtinfo.version;
          this.versionCode = wgtinfo.versionCode ;
        console.log('版本号',this.version)
      })

    },
    methods: {
      getDetail(){
        const data={}
        uni.showLoading({
					mask:true
				})
				this.$Ajax('/api/notice/getAdvertisementList',data,res => {
          uni.hideLoading();
          if (res.code == 200) {
            this.detail = res.data[0]
            console.log('detail',this.detail)
          }
        }, err =>{
						uni.hideLoading();
					}, 'GET'
        )
      },
    },
};
</script>

<style lang="scss" scoped>
.about{
  .content{
    width: 93.6%;
    margin: auto;
    padding-bottom: 20rpx;
    .img{
      width: 100%;
      image{
        width: 100%;
        border-radius: 16rpx;
      }
    }
    .sameInfo{
      width: 100%;
      margin-top: 24rpx;
      background: #fff;
      border-radius: 16rpx;
    }
    .title{
      margin-top: 24rpx;
      font-weight: 600;
      font-size: 28rpx;
      color: #333333;
    }
    .des{
      padding: 32rpx 24rpx;
      font-weight: 500;
      font-size: 24rpx;
      color: #333333;
      /deep/ p{
        text-indent: 2em;
      }
    }
    .info{
      padding: 42rpx 10rpx;
      .p{
        font-size: 28rpx;
        color: #333333;
        text-align: center;
        margin-top: 24rpx;
      }
      .p:nth-of-type(1){
        margin-top: 0;
      }
      .submit{
        width: 100%;
        margin-top: 24rpx;
        text-align: center;
        height: 60rpx;
        line-height: 60rpx;
        font-weight: 500;
        font-size: 24rpx;
        color: #FFFFFF;
        background: #EE3A33;
        border-radius: 80rpx;
      }
    }
    .group{
      padding: 20rpx;
      font-weight: 500;
      font-size: 28rpx;
      color: rgba(0,0,0,0.9);
      @include flexBetween;
    }
    .version{
      text-align: center;
      padding: 20rpx;
      font-weight: 500;
      font-size: 28rpx;
      color: #999;
    }
  }
}
</style>
